Matthias Clasen [Fri, 1 Oct 2021 20:23:12 +0000 (16:23 -0400)]
gsk: Add high depth rendernode api
Add private api to find out if the content
of a render node should be considered 'deep'.
The information is collected at creation time,
so there is no tree-walking involved when we
are using this information in the renderer.
Currently, this comes down to whether there are
any texture nodes with high depth textures in the subtree.
In the future, we may want to allow marking gradient
nodes in this way as well.
Benjamin Otte [Thu, 7 Oct 2021 00:41:30 +0000 (02:41 +0200)]
texture: Make format a property of GdkTexture
For MemoryTexture, this is a simple change.
For GLTexture, we need to query the format at texture creation. This
sounds like a bad idea and extra work until one realizes that we'd
need to do that anyway when using the texure the first time - either
when downloading, or when trying to use it in a rendernode, where we
will soon need that information to determine if the texture prefers high
depth.
Benjamin Otte [Wed, 6 Oct 2021 16:25:30 +0000 (18:25 +0200)]
gdk: hdr => high depth
The term "hdr" is so overloaded, we shouldn't use them anywhere, except
from maybe describing all of this work in blog posts and other marketing
materials.
So do renames:
* hdr => high_depth
* request_hdr => prefers_high_depth
Benjamin Otte [Sat, 2 Oct 2021 20:38:05 +0000 (22:38 +0200)]
gdk: Add GDK_DEBUG=hdr
Forces request_hdr = TRUE for all requests.
Backends should also use this when choosing whether to honor HDR
requests for low quality compositors - as long as the compositor
pretends to support HDR, shovel HDR at it.
Benjamin Otte [Tue, 5 Oct 2021 22:34:10 +0000 (00:34 +0200)]
egl: Unify contexts
Unify the X11 and Wayland EGL contexts.
This is a bit ugly to implement, because I don't want to create an
interface and I can't make them inherit from the same object, because
one needs to inherit from X11GLContext and the other from
WaylandGLContext.
So we have to put the code in GdkGLContext and make sure non-EGL
contexts can't accidentally run it. This is rather easy because we can
just check for priv->egl_context != NULL.
Matthias Clasen [Wed, 6 Oct 2021 00:09:20 +0000 (20:09 -0400)]
inspector: Export gtk_inspector_init
Quietly export this function mainly for the benefit
of libadwaita, which can can use this to install its
implementation of the gtk-inspector-page extension
point.
Benjamin Otte [Sat, 2 Oct 2021 03:21:29 +0000 (05:21 +0200)]
gdk: Make GDK_DEBUG GL backend selection global
We have a global GdkGLBackendType now, just set it.
This way, using the variable forces the backend type, and we don't need
special code handling the env vars in the backends.
It also means setting the env var will now "work" on GDK backends that
don't even support that GL backend and simualte another GDK backend
having registered that GL backend already. So you can run
GDK_DEBUG=gl-wgl gtk4-demo
on test what Wayland will do when WGL is in use.
Pierre Ossman [Mon, 4 Oct 2021 07:23:39 +0000 (09:23 +0200)]
searchenginemodel: finalize search results
It is necessary to signal the search engine that we are finished and
that we found something for it to reliably show the results. It would
sometimes work anyway since it is sufficient if any backend signals
completion. However if GtkSearchEngineModel was the only backend
returning results then things would break.
Matthias Clasen [Mon, 4 Oct 2021 01:01:04 +0000 (21:01 -0400)]
Add depfiles back to resource generation
The recent change to faster resource generation
lost the depfiles to ensure that we regenerate
resources when any of the contents change.
Bring it back.
Matthias Clasen [Sun, 3 Oct 2021 17:43:15 +0000 (13:43 -0400)]
ngl: Don't cache large glyphs forever
We never put large icons into the icon cache,
so all its items are always atlased, but we do
put large glyphs in to the glyph cache, and we
were never freeing those items, even when they
go unused. Fix that.
Matthias Clasen [Fri, 1 Oct 2021 02:55:31 +0000 (22:55 -0400)]
gtk: Speed up build
Avoid serializing the gresource blob into a C string
and running gcc over it. Instead, use ld to put it
directly into an .o file and add it to the build.
The build system machinations here were copied from
gobject/tests/meson.build, and should ideally be part
of the meson gnome module.
Matthias Clasen [Fri, 1 Oct 2021 02:47:00 +0000 (22:47 -0400)]
gtk-demo: Speed up the build
Avoid serializing the gresource blob into a C string
and running gcc over it. Instead, use ld to put it
directly into an .o file and add it to the build.
The build system machinations here were copied from
gobject/tests/meson.build, and should ideally be part
of the meson gnome module.
Matthias Clasen [Fri, 1 Oct 2021 02:41:36 +0000 (22:41 -0400)]
widget-factory: Speed up build
Avoid serializing the gresource blob into a C string
and running gcc over it. Instead, use ld to put it
directly into an .o file and add it to the build.
The build system machinations here were copied from
gobject/tests/meson.build, and should ideally be part
of the meson gnome module.
Emmanuele Bassi [Fri, 1 Oct 2021 00:44:01 +0000 (01:44 +0100)]
docs: Fix links in the Getting Started page
We still have links to old gtk-doc references, as well as links to
developer.gnome.org locations that don't exist any more. On the other
hand, we are missing a bunch of links to existing types and symbols.
Chun-wei Fan [Thu, 30 Sep 2021 08:17:48 +0000 (16:17 +0800)]
meson: Improve search for libpng
On Visual Studio-style builds, it is likely that we do not have pkg-config
files for libpng, so improve the search for libpng by using CMake's built-in
mechanisms for looking for libpng. This, however, means that we need to use
'png' rather than 'libpng' for the package name to search for.
We don't really need a bus-address property
that gets copied for every single object.
We keep the address in object data on the
display anyway. Just use it from there.
This gets rid of a nice amount of strdups
at startup.